import config from '@/config';
import http from '@/utils/request';

export default {
	page: {
		url: `${config.API_URL}/reworkdocline/pages/`,
		name: '分页',
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	list: {
		url: `${config.API_URL}/reworkdocline/list/`,
		name: '列表',
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	listByDocId: {
		url: `${config.API_URL}/reworkdocline/listbydocid/`,
		name: '根据返工单查询',
		get: async function (params) {
			return await http.get(this.url + params);
		},
	},
	model: {
		url: `${config.API_URL}/reworkdocline/`,
		name: '查询一条',
		get: async function (params) {
			return await http.get(this.url + params);
		},
	},
	add: {
		url: `${config.API_URL}/reworkdocline/`,
		name: '添加',
		post: async function (data) {
			return await http.post(this.url, data);
		},
	},
	update: {
		url: `${config.API_URL}/reworkdocline/`,
		name: '修改',
		put: async function (data) {
			return await http.put(this.url, data);
		},
	},
	delete: {
		url: `${config.API_URL}/reworkdocline/`,
		name: '删除',
		delete: async function (data) {
			return await http.delete(this.url, data);
		},
	},
};
